<?php
namespace app\common\request\jy;

class OrderRefund extends Base {
	//获取退款单ID
	public function get_id() {
		return $this->post('id');
	}

	//获取退款申请数据
	public function getRefund() {
		$oid = $this->post('oid');
		$uid = $this->get_current_uid();
		$opids = $this->post_collection('opids');
		$nums = $this->post_collection('nums');
		$remark = $this->post('remark', '');
		$iids = $this->post_collection('iids');
		return compact('oid', 'uid', 'opids', 'nums', 'remark', 'iids');
	}

	//获取店铺退款单列表数据
	public function getStorePrivateList() {
		$limit = $this->param('limit');
		$store = $this->get_current_store();
		$type = $this->post('type');
		$sid = $store['id'];
		$product = $this->post('product');
		$status = $this->post('status');
		return compact('limit', 'sid', 'type', 'product', 'status');
	}

	//获取查询退款列表数据
	public function getPrivateListSearch() {
		$type = $this->post('type');
		$product = $this->post('product');
		$status = $this->post('status');
		return compact('type', 'product', 'status');
	}

	//获取用户查看数据的提交信息
	public function getUserInfo() {
		$id = $this->post('id');
		$uid = $this->get_current_uid();
		return compact('id', 'uid');
	}

	//获取店铺查看数据的提交信息
	public function getStoreInfo() {
		$id = $this->post('id');
		$store = $this->get_current_store();
		$sid = $store['id'];
		return compact('id', 'sid');
	}

	//获取店铺处理申请退款数据
	public function getStoreRefundHandle() {
		$id = $this->post('id');
		$store = $this->get_current_store();
		$sid = $store['id'];
		$operate = $this->post('operate'); //商家需要执行的操作 refuse,agree,refund(直接退款)
		$remark = $this->post('remark', '');
		$iids = $this->post_collection('iids');
		return compact('id', 'sid', 'operate', 'remark', 'iids');
	}

	//获取用户退货数据
	public function getUserReturnProduct() {
		$id = $this->post('id');
		$uid = $this->get_current_uid();
		$expressNumber = $this->post('express_number', '');
		$remark = $this->post('remark', '');
		$iids = $this->post_collection('iids');
		return compact('id', 'uid', 'expressNumber', 'remark', 'iids');
	}

	//获取商家收到退货数据
	public function getStoreReceivedReturn() {
		$id = $this->post('id');
		$store = $this->get_current_store();
		$sid = $store['id'];
		$remark = $this->post('remark', '');
		$iids = $this->post_collection('iids');
		return compact('id', 'sid', 'remark', 'iids');
	}

	//获取商家收到退货后操作数据
	public function getStoreRefundProductHandle() {
		$id = $this->post('id');
		$store = $this->get_current_store();
		$sid = $store['id'];
		$operate = $this->post('operate'); //商家需要执行的操作 refuse,agree,refund
		$remark = $this->post('remark', '');
		$iids = $this->post_collection('iids');
		return compact('id', 'sid', 'operate', 'remark', 'iids');
	}

	//获取申请管理员介入数据
	public function getApplyForAdministratorIntervention() {
		$id = $this->post('id');
		$uid = $this->get_current_uid();
		$remark = $this->post('remark', '');
		$iids = $this->post_collection('iids');
		return compact('id', 'uid', 'remark', 'iids');
	}

	//获取管理员操作数据
	public function getAdministratorHandle() {
		$id = $this->post('id');
		$aid = $this->get_admin_id();
		$operate = $this->post('operate');
		$remark = $this->post('remark', '');
		$iids = $this->post_collection('iids');
		return compact('id', 'aid', 'operate', 'remark', 'iids');
	}

	//获取用户退货数据2
	public function getUserReturnProduct2() {
		$id = $this->post('id');
		$uid = $this->get_current_uid();
		$expressNumber = $this->post('express_number');
		$remark = $this->post('remark', '');
		$iids = $this->post_collection('iids');
		return compact('id', 'uid', 'expressNumber', 'remark', 'iids');
	}

	//获取商家收到退货数据
	public function getStoreReceivedReturn2() {
		$id = $this->post('id');
		$store = $this->get_current_store();
		$sid = $store['id'];
		$remark = $this->post('remark', '');
		$iids = $this->post_collection('iids');
		return compact('id', 'sid', 'remark', 'iids');
	}

	//获取商家收到退货后操作数据
	public function getStoreRefundProduct2Handle() {
		$id = $this->post('id');
		$store = $this->get_current_store();
		$sid = $store['id'];
		$operate = $this->post('operate'); //商家需要执行的操作 refuse,agree,refund
		$remark = $this->post('remark', '');
		$iids = $this->post_collection('iids');
		return compact('id', 'sid', 'operate', 'remark', 'iids');
	}

	//获取再次申请管理员介入数据
	public function getApplyForAdministratorIntervention2() {
		$id = $this->post('id');
		$uid = $this->get_current_uid();
		$remark = $this->post('remark', '');
		$iids = $this->post_collection('iids');
		return compact('id', 'uid', 'remark', 'iids');
	}

	//获取再次管理员操作数据
	public function getAdministratorHandle2() {
		$id = $this->post('id');
		$aid = $this->get_admin_id();
		$operate = $this->post('operate');
		$remark = $this->post('remark', '');
		$iids = $this->post_collection('iids');
		return compact('id', 'aid', 'operate', 'remark', 'iids');
	}
}
